From: Dmitry Gutov Date: Thu, 16 May 2024 22:05:17 +0000 (+0300) Subject: ; Fix search in remote project with relative file names X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~14^2~18^2~1475 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=113bd2082c982df933df9b12c3994d6d582c8268;p=emacs.git ; Fix search in remote project with relative file names --- diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 9013729c505..ecaeac18c3a 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -2101,7 +2101,10 @@ Such as the current syntax table and the applied syntax properties." (defun xref--convert-hits (hits regexp) (let (xref--last-file-buffer (tmp-buffer (generate-new-buffer " *xref-temp*")) - (xref--hits-remote-id (file-remote-p default-directory)) + (xref--hits-remote-id (if (file-name-absolute-p (cadar hits)) + ;; TODO: Add some test for this. + (file-remote-p default-directory) + default-directory)) (syntax-needed (xref--regexp-syntax-dependent-p regexp))) (unwind-protect (mapcan (lambda (hit)